package entity;

public class User {
	
	private String id, name, password;
	private byte sex;
	private String city;
	private String role;
	private ShoppingCart cart;
	
	public User() {}
	
	public User(String id) {
		super();
		this.id = id;
	}
	
	public User(String id, String password, String role) {
		
		super();
		this.id = id;
		this.password = password;
		this.role = role;
	
	}
	
	public User(String id, String name, String password, byte sex, String city, String role) {
		super();
		this.id = id;
		this.name = name;
		this.password = password;
		this.sex = sex;
		this.city = city;
		this.role = role;
	}

	public User(String id, String name, String password, byte sex, String city) {
		super();
		this.id = id;
		this.name = name;
		this.password = password;
		this.sex = sex;
		this.city = city;
	}
	
	public User(String id, String password) {
		super();
		this.id = id;
		this.password = password;
	}


	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getPassword() {
		return password;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
	
	public byte getSex() {
		return sex;
	}
	
	public void setSex(byte sex) {
		this.sex = sex;
	}
	
	public String getCity() {
		return city;
	}
	
	public void setCity(String city) {
		this.city = city;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public User(String id, String name, String password, byte sex, String city, String role, ShoppingCart cart) {
		super();
		this.id = id;
		this.name = name;
		this.password = password;
		this.sex = sex;
		this.city = city;
		this.role = role;
		this.cart = cart;
	}

	public ShoppingCart getCart() {
		return cart;
	}

	public void setCart(ShoppingCart cart) {
		this.cart = cart;
	}
	
	@Override
	public String toString() {
			
		return id + ":" + name + ":" + password + ":" + sex + ":" + city + ":" + role;
	}
	
}

